package developer.zyk.global.common.consts;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @author zhangyongkang
 * @time 2025/5/14 14:46
 * @description
 */
@Getter
@AllArgsConstructor
public enum OssPlatformEnum {
    TENCENT("tencent", "腾讯OCS"),
    ALI("alibaba", "阿里OSS");
    private final String code;
    private final String name;


    public static OssPlatformEnum queryByCode(String code) {
        for (OssPlatformEnum value : values()) {
            if (Objects.equals(code, value.getCode())) {
                return value;
            }
        }
        return null;
    }
}
